```typescript filename="@agentica/core/AgenticaHistory" showLineNumbers
export type AgenticaHistory =
  | AgenticaHistory.Text
  | AgenticaHistory.Select
  | AgenticaHistory.Cancel
  | AgenticaHistory.Execute
  | AgenticaHistory.Describe;
export namespace AgenticaHistory {
  export interface Select extends Base<"select"> {
    id: string;
    selections: AgenticaOperationSelection[];
    toJSON(): IAgenticaHistoryJson.ISelect;
  }
  export interface Cancel extends Base<"cancel"> {
    id: string;
    selections: IAgenticaOperationSelection[];
    toJSON(): IAgenticaHistoryJson.ICancel;
  }
  export interface Execute extends Base<"execute"> {
    id: string;
    operation: AgenticaOperation;
    arguments: Record<string, any>;
    value: any;
    toJSON(): IAgenticaHistoryJson.IExecute;
  }
  export interface Describe extends Base<"describe"> {
    executes: Execute[];
    text: string;
    toJSON(): IAgenticaHistoryJson.IDescribe;
  }
  export interface Text extends Base<"text"> {
    role: "assistant" | "user";
    text: string;
    toJSON(): IAgenticaHistoryJson.IText;
  }
  interface Base<Type extends string> {
    type: Type;
  }
}
```